package com.mzkj.wanjulaile.mobile.api.modules.category.service;

import com.mzkj.wanjulaile.mobile.api.common.service.CrudService;
import com.mzkj.wanjulaile.mobile.api.modules.category.entity.SubCategory;
import com.mzkj.wanjulaile.mobile.api.modules.category.mapper.SubCategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 产品子分类Service
 * @author ianly
 * @version 2016-10-09
 */
@Service
@Transactional(readOnly = true)
public class SubCategoryServiceImpl implements SubCategoryService {
	@Autowired
	private SubCategoryMapper subCategoryMapper;

	public List<SubCategory> findPage(SubCategory subCategory){
		return subCategoryMapper.findList(subCategory);
	}


	/**
	 * 根据type获取锻炼能力下的分类
	 * @param subCategory
	 * @return
     */
	public List<SubCategory> getSubCategoryByType(SubCategory subCategory){
		return subCategoryMapper.getSubCategoryByType(subCategory);
	}
}